home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GTPLTSZ.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  428 b   |  16 lines

  1. /* getpalettesize */
  2. #include <stdio.h>
  3. #include <conio.h>
  4. #include <graphics.h>
  5. main()
  6. {
  7.     int graphdriver = DETECT,graphmode;
  8. /* Detect and initialize the graphics system */
  9.     initgraph(&graphdriver,&graphmode,"c:\\turboc");
  10. /* Get the number of colors in the current palette */
  11.     printf("Current palette has %d colors \n",
  12.         getpalettesize());
  13. /* Wait for a keystroke before exiting */
  14.     getch();
  15.     closegraph();
  16. }